﻿<!DOCTYPE html>
<html>
<head>
    <title>企捷科技</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name=”renderer” content=”webkit|ie-comp|ie-stand” />
    <link rel="stylesheet" href="//at.alicdn.com/t/font_ug9f5r880f36usor.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/animate.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/default.css">
    <link rel="stylesheet" type="text/css" href="/ViewV5/CSS/index.css">
</head>
<body>
    <div ms-controller="W_KCCKDetail" style="margin-top:50px;"> 
  
        <!-- 表格 -->
        <div class="default-tab ft14 pt20 hover-btn">
            <table class="table table-striped table-responsive table-hover">
                <thead>
                    <tr>
                        <th class="tc">序号</th> 
                        <th>用户名</th>
                        <th>培训课程名称</th> 
                        <th>查看总时长</th>  
                    </tr>
                </thead>
                <tbody>
                    <tr ms-repeat-el="ListData">
                        <td class="tc">
                            {{$index+1+page.pagecount*(page.pageindex-1)}}
                        </td> 
                        <td>{{el.UserRealName}}</td>
                        <td>{{el.KCName}}</td> 
                        <td>{{el.KCDuration }}</td>
                        
                    </tr>

                </tbody>
                <tfoot>
                    <tr ms-if="isnull"><td class="tc"></td><td>暂无数据</td></tr>
                </tfoot>
            </table>
            <div class="ui-datatable-page ft14 pl20">

                <div id="pageDiv" ms-visible="tempindex.page.total>tempindex.pageNum[0].num" class="pull-right"></div>
                <div class="pull-right" ms-visible="ListData.size()!=0">
                    <span>共{{tempindex.page.total}}条记录</span>
                    <span ms-visible="tempindex.page.total>tempindex.pageNum[0].num">
                        选择每页条数
                        <select style="height: 25px; width: 50px;" ms-change="selNum(this.value)" ms-duplex="tempindex.page.pagecount">
                            <option ms-repeat-pg="pageNum" ms-attr-value="pg.num" ms-attr-selected="pg.num==tempindex.page.pagecount?'selected':''">{{pg.num}}</option>
                        </select>
                    </span>
                </div>

            </div>
        </div> 
    </div> 
    <script src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/laypage/laypage.js"></script>
    <script src="/ViewV5/JS/Sortable.js"></script>
    <script src="/ViewV5/JS/avalon1.47.js?ver=1"></script>
    <script src="/ViewV5/JS/toastr.js"></script>
    <script src="/ViewV5/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js"></script>
    <script>
        var tempindex = avalon.define({
            $id: "W_KCCKDetail",
            page: { total: 0, pagecount: 8,pageindex:1 },
            searchcontent:"",
            pageNum:[10,20,30],
            ListData: [],
            isnull:false,
            userName: ComFunJS.getnowuser(),
            kcId: ComFunJS.getQueryString("ID"),
            user: ComFunJS.getQueryString("user"),
            GetLIST: function () {
                $.getJSON('/API/VIEWAPI.ashx?Action=KCGL_GETKCSEETIME', { p: 1, P1: tempindex.kcId,  pagecount: tempindex.page.pagecount, P2: tempindex.user }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempindex.ListData = resultData.Result;
                        tempindex.page.total = resultData.Result1;
                        if (tempindex.ListData.size() == 0) { tempindex.isnull = true; } else { tempindex.isnull = false; }
                        laypage({
                            cont: 'pageDiv', //容器。值支持id名、原生dom对象，jquery对象。
                            pages: Math.ceil(parseInt(resultData.Result1) * 1.0 / tempindex.page.pagecount), //通过后台拿到的总页数
                            curr: 1, //初始化当前页
                            skin: 'molv',
                            jump: function (e) { //触发分页后的回调
                                if (e.curr != tempindex.page.pageindex) {
                                    $.getJSON('/API/VIEWAPI.ashx?Action=KCGL_GETKCSEETIME', { p: e.curr, P1: tempindex.kcId,   pagecount: tempindex.page.pagecount, P2: tempindex.user }, function (resultData) {
                                        if (resultData.ErrorMsg == "") {
                                            tempindex.ListData = resultData.Result;
                                        }
                                    })
                                    tempindex.page.pageindex = e.curr;
                                }
                            }
                        });
                    }
                })
            },

        })//@ sourceURL=KCGLLSIT.js;

        avalon.ready(function () {
            tempindex.GetLIST();
        })
    </script>
</body>
</html>